package com.gitee.fsmxm.ocon.model;

/**
 * @author fsmxm
 */
public class PoolProperties {

    /**
     * 进程数，默认1个
     */
    private int initProcessNum = 1;

    /**
     * 程序僵死时间 ms，超过设置时间则认定程序僵死，默认60秒
     */
    private int fatalErrorTime = 60000;

    /**
     * 启动时杀掉遗留(已有)进程
     */
    private boolean startAndKillExistProcess;

    /**
     * 进程标识
     */
    private String procedureImage;

    /**
     * 程序名称标识
     */
    private String appName;

    public int getInitProcessNum() {
        return initProcessNum;
    }

    public void setInitProcessNum(int initProcessNum) {
        this.initProcessNum = initProcessNum;
    }

    public int getFatalErrorTime() {
        return fatalErrorTime;
    }

    public void setFatalErrorTime(int fatalErrorTime) {
        this.fatalErrorTime = fatalErrorTime;
    }

    public boolean isStartAndKillExistProcess() {
        return startAndKillExistProcess;
    }

    public void setStartAndKillExistProcess(boolean startAndKillExistProcess) {
        this.startAndKillExistProcess = startAndKillExistProcess;
    }

    public String getProcedureImage() {
        return procedureImage;
    }

    public void setProcedureImage(String procedureImage) {
        this.procedureImage = procedureImage;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    @Override
    public String toString() {
        return "PoolProperties{" +
                "initProcessNum=" + initProcessNum +
                ", fatalErrorTime=" + fatalErrorTime +
                ", startAndKillRunningProcess=" + startAndKillExistProcess +
                ", procedureImage='" + procedureImage + '\'' +
                ", appName='" + appName + '\'' +
                '}';
    }
}
